# 雷达信号
import torch
from apps.exp.exp_config import ExpConfig as EG

class SourceSignal(object):
    def __init__(self):
        self.name = 'apps.exp.source_signal.SourceSignal'

    @staticmethod
    def generate_signal() -> torch.Tensor:
        phase = 2 * torch.pi * (EG.f0 * EG.t + 0.5 * EG.K * EG.t**2)
        s = torch.exp(1j * phase)  # 复数信号
        return s